document.addEventListener('DOMContentLoaded', function() {
    const container = document.getElementById('container');
    const items = document.getElementsByClassName('item');
    const myButton = document.getElementById('myButton');
    const displayMessage = document.getElementById('displayMessage');

     myButton.addEventListener('click', function() {
        displayMessage.textContent = '按钮被点击了!';

        for (let i = 0; i < items.length; i++) {
            items[i].textContent = `节点 ${i+1} - 点击后!`;
        }
      });
});